<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/r.js"></script>
<link href="css/r.css" rel="stylesheet" type="text/css" />
<body>
	<div class="register">
		<div class="navigation">
			<div class="img" onclick="imgClick()"><img src="images/backBtn.png" height="100%" width="20%"></div><div class="font"><font size="3" color="white">预约记录</font></div>
		</div>
		<table>
			<thead>
				<tr bgcolor="#E6E6FA">
					<th>科室</th>
					<th>医生</th>
					<th>费用</th>
					<th>预约时间</th>
					<th>订单创建时间</th>
				</tr>
			</thead>
			<tbody id="tableBody">
				<tr>
					<td>骨科</td>
					<td>华佗</td>
					<td>10元</td>
					<td>2016-12-12</td>
					<td>2016-12-11</td>
				</tr>
				<tr>
					<td>骨科</td>
					<td>扁鹊</td>
					<td>10元</td>
					<td>2016-12-12</td>
					<td>2016-12-11</td>
				</tr>
			</tbody>
		</table>
		<div class="fontBottom">--我也是有底线的--</div>
	</div>
<script type="text/javascript">
window.onload=loadPage;

$(function(){
});

function loadPage() {
	$.ajax({
        url: "http://127.0.0.1:8080/user/register",
        timeout: 30000,
        type: "get",
        dataType: "json",
        success: function (data) {
        	var html = "";
        	for(var i = 0; i < data.length; i++){
        		html=html+"<tr>"
        					+"<td>"+data[i].department+"</td>"
        					+"<td>"+data[i].person_name+"</td>"
        					+"<td>"+data[i].registrationfee+"元</td>"
        					+"<td>"+data[i].CNworktime+"</td>"
        					+"<td>"+data[i].CNcreatetime+"</td>"
						 +"</tr>";
        	}
			$("#tableBody").html(html);
        }
	});
}
</script>
</body>
</html>